//
//  AssertionException.m
//  WiteBox
//
//  Created by John Blanco on 6/27/09.
//  Copyright 2009 Effective UI. All rights reserved.
//

#import "AssertionException.h"


@implementation AssertionException

@synthesize expectedValue;
@synthesize actualValue;
@synthesize filename;
@synthesize lineNumber;

- (id)initExceptionWithReason:(NSString *)reason expectedValue:(NSString *)theExpectedValue actualValue:(NSString *)theActualValue filename:(NSString *)theFilename lineNumber:(NSInteger)theLineNumber {
	self = [super initWithName:@"AssertionException" reason:reason userInfo:nil];

	if (self) {
		expectedValue = [theExpectedValue retain];
		actualValue = [theActualValue retain];
		filename = [[theFilename lastPathComponent] retain];
		lineNumber = theLineNumber;
	}

	return self;
}

- (void)dealloc {
	[expectedValue release];
	[actualValue release];
	[filename release];
	
	[super dealloc];
}

@end
